package edu.gatech.foodaway;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SignInActivity extends Activity {
	public final static String SIGN_IN_AS = "sign_in_as";
	Button btn_donor;
	Button btn_NGO;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sign_in);
		btn_donor = (Button) findViewById(R.id.btn_donor);
		btn_NGO = (Button) findViewById(R.id.btn_NGO);
		btn_donor.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				Intent i = new Intent(SignInActivity.this, LoginActivity.class);
				i.putExtra(SignInActivity.SIGN_IN_AS, "donor");
				startActivity(i);
				
			}
			
		});
		btn_NGO.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				Intent i = new Intent(SignInActivity.this, LoginActivity.class);
				i.putExtra(SignInActivity.SIGN_IN_AS, "ngo");
				startActivity(i);
				
			}
			
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.sign_in, menu);
		return true;
	}

}
